type go/types.operand
123 uses
go/types (current package)
api_predicates.go#L34: x := operand{mode: value, typ: V}
api_predicates.go#L45: x := operand{mode: value, typ: V}
assignments.go#L24: func (check *Checker) assignment(x *operand, T Type, context string) {
assignments.go#L121: func (check *Checker) initConst(lhs *Const, x *operand) {
assignments.go#L156: func (check *Checker) initVar(lhs *Var, x *operand, context string) {
assignments.go#L215: var x operand
assignments.go#L235: var op operand
assignments.go#L252: func (check *Checker) assignVar(lhs, rhs ast.Expr, x *operand, context string) {
assignments.go#L271: x = new(operand)
assignments.go#L282: func operandTypes(list []*operand) (res []Type) {
assignments.go#L368: func (check *Checker) returnError(at positioner, lhs []*Var, rhs []*operand) {
assignments.go#L406: var x operand
badlinkname.go#L20: func badlinkname_Checker_infer(*Checker, positioner, []*TypeParam, []Type, *Tuple, []*operand, bool, *error_) []Type
builtins.go#L23: func (check *Checker) builtin(x *operand, call *ast.CallExpr, id builtinId) (_ bool) {
builtins.go#L51: var args []*operand // not valid for _Make, _New, _Offsetof, _Trace
builtins.go#L300: toFloat := func(x *operand) {
builtins.go#L792: check.record(&operand{mode, selx, obj.Type(), nil, 0})
builtins.go#L943: var t operand
builtins.go#L965: func sliceElem(x *operand) (Type, *typeError) {
builtins.go#L1038: func (check *Checker) applyTypeFunc(f func(Type) Type, x *operand, id builtinId) Type {
call.go#L34: func (check *Checker) funcInst(T *target, pos token.Pos, x *operand, ix *indexedExpr, infer bool) []Type {
call.go#L86: var args []*operand
call.go#L104: args = []*operand{{mode: value, expr: expr, typ: T.sig}}
call.go#L172: func (check *Checker) callExpr(x *operand, call *ast.CallExpr) exprKind {
call.go#L343: func (check *Checker) exprList(elist []ast.Expr) (xlist []*operand) {
call.go#L348: xlist = make([]*operand, n)
call.go#L350: var x operand
call.go#L365: func (check *Checker) genericExprList(elist []ast.Expr) (resList []*operand, targsList [][]Type) {
call.go#L391: var x operand
call.go#L405: resList = []*operand{&x}
call.go#L412: resList = make([]*operand, t.Len())
call.go#L414: resList[i] = &operand{mode: value, expr: e, typ: v.typ}
call.go#L418: resList = []*operand{&x}
call.go#L423: resList = make([]*operand, n)
call.go#L426: var x operand
call.go#L462: func (check *Checker) arguments(call *ast.CallExpr, sig *Signature, targs []Type, xlist []ast.Expr, args []*operand, atargs [][]Type) (rsig *Signature) {
call.go#L674: func (check *Checker) selector(x *operand, e *ast.SelectorExpr, def *TypeName, wantType bool) {
call.go#L1008: var x operand
const.go#L22: func (check *Checker) overflow(x *operand, opPos token.Pos) {
const.go#L239: func (check *Checker) representable(x *operand, typ *Basic) {
const.go#L254: func (check *Checker) representation(x *operand, typ *Basic) (constant.Value, Code) {
const.go#L277: func (check *Checker) invalidConversion(code Code, x *operand, target Type) {
const.go#L289: func (check *Checker) convertUntyped(x *operand, target Type) {
conversions.go#L20: func (check *Checker) conversion(x *operand, T Type) {
conversions.go#L139: func (x *operand) convertibleTo(check *Checker, T Type, cause *string) bool {
decl.go#L473: var x operand
decl.go#L516: var x operand
errors.go#L303: case *operand:
eval.go#L93: var x operand
expr.go#L73: func (check *Checker) op(m opPredicates, x *operand, op token.Token) bool {
expr.go#L129: func (check *Checker) unary(x *operand, e *ast.UnaryExpr) {
expr.go#L197: func (check *Checker) chanElem(pos positioner, x *operand, recv bool) Type {
expr.go#L362: c := operand{old.mode, x, old.typ, old.val, 0}
expr.go#L387: func (check *Checker) implicitTypeAndValue(x *operand, target Type) (Type, constant.Value, Code) {
expr.go#L482: func (check *Checker) comparison(x, y *operand, op token.Token, switchCase bool) {
expr.go#L617: func (check *Checker) shift(x, y *operand, e ast.Expr, op token.Token) {
expr.go#L779: func (check *Checker) binary(x *operand, e ast.Expr, lhs, rhs ast.Expr, op token.Token, opPos token.Pos) {
expr.go#L780: var y operand
expr.go#L875: func (check *Checker) matchTypes(x, y *operand) {
expr.go#L885: mayConvert := func(x, y *operand) bool {
expr.go#L968: func (check *Checker) rawExpr(T *target, x *operand, e ast.Expr, hint Type, allowGeneric bool) exprKind {
expr.go#L992: func (check *Checker) nonGeneric(T *target, x *operand) {
expr.go#L1021: func (check *Checker) exprInternal(T *target, x *operand, e ast.Expr, hint Type) exprKind {
expr.go#L1232: func (check *Checker) typeAssertion(e ast.Expr, x *operand, T Type, typeSwitch bool) {
expr.go#L1251: func (check *Checker) expr(T *target, x *operand, e ast.Expr) {
expr.go#L1258: func (check *Checker) genericExpr(x *operand, e ast.Expr) {
expr.go#L1269: func (check *Checker) multiExpr(e ast.Expr, allowCommaOk bool) (list []*operand, commaOk bool) {
expr.go#L1270: var x operand
expr.go#L1276: list = make([]*operand, t.Len())
expr.go#L1278: list[i] = &operand{mode: value, expr: e, typ: v.typ}
expr.go#L1284: list = []*operand{&x}
expr.go#L1286: x2 := &operand{mode: value, expr: e, typ: Typ[UntypedBool]}
expr.go#L1300: func (check *Checker) exprWithHint(x *operand, e ast.Expr, hint Type) {
expr.go#L1311: func (check *Checker) exprOrType(x *operand, e ast.Expr, allowGeneric bool) {
expr.go#L1319: func (check *Checker) exclude(x *operand, modeset uint) {
expr.go#L1346: func (check *Checker) singleValue(x *operand) {
format.go#L23: case operand:
format.go#L25: case *operand:
index.go#L19: func (check *Checker) indexExpr(x *operand, e *indexedExpr) (isFuncInst bool) {
index.go#L95: var key operand
index.go#L169: var k operand
index.go#L211: func (check *Checker) sliceExpr(x *operand, e *ast.SliceExpr) {
index.go#L393: var x operand
index.go#L418: func (check *Checker) isValidIndex(x *operand, code Code, what string, allowNegative bool) bool {
infer.go#L35: func (check *Checker) infer(posn positioner, tparams []*TypeParam, targs []Type, params *Tuple, args []*operand, reverse bool, err *error_) (inferred []Type) {
infer.go#L119: errorf := func(tpar, targ Type, arg *operand) {
literals.go#L48: func (check *Checker) basicLit(x *operand, e *ast.BasicLit) {
literals.go#L83: func (check *Checker) funcLit(x *operand, e *ast.FuncLit) {
literals.go#L111: func (check *Checker) compositeLit(x *operand, e *ast.CompositeLit, hint Type) {
literals.go#L390: var x operand
operand.go#L59: type operand struct {
operand.go#L69: func (x *operand) Pos() token.Pos {
operand.go#L113: func operandString(x *operand, qf Qualifier) string {
operand.go#L264: func (x *operand) String() string {
operand.go#L269: func (x *operand) setConst(k token.Token, lit string) {
operand.go#L298: func (x *operand) isNil() bool {
operand.go#L312: func (x *operand) assignableTo(check *Checker, T Type, cause *string) (bool, Code) {
range.go#L29: var x operand
range.go#L56: check.record(&operand{
range.go#L139: var y operand
range.go#L180: var y operand
recording.go#L18: func (check *Checker) record(x *operand) {
recording.go#L97: func (check *Checker) recordCommaOkTypes(x ast.Expr, a []*operand) {
stmt.go#L174: var x operand
stmt.go#L237: func (check *Checker) caseValues(x *operand, values []ast.Expr, seen valueMap) {
stmt.go#L240: var v operand
stmt.go#L307: func (check *Checker) caseTypes(x *operand, types []ast.Expr, seen map[Type]ast.Expr) Type {
stmt.go#L309: var dummy operand
stmt.go#L359: func (check *Checker) caseTypes_currently_unused(x *operand, xtyp *Interface, types []ast.Expr, seen map[string]ast.Expr) Type {
stmt.go#L361: var dummy operand
stmt.go#L444: var x operand
stmt.go#L465: var ch, val operand
stmt.go#L487: var x operand
stmt.go#L529: var x operand
stmt.go#L610: var x operand
stmt.go#L633: var x operand
stmt.go#L727: var sx *operand // switch expression against which cases are compared against; nil if invalid
stmt.go#L729: var x operand
stmt.go#L838: var x operand
typexpr.go#L21: func (check *Checker) ident(x *operand, e *ast.Ident, def *TypeName, wantType bool) {
typexpr.go#L257: var x operand
typexpr.go#L274: var x operand
typexpr.go#L523: var x operand